/**
 * @author: Miss.杨
 * @date: 2025年3月16日 15:38:51
 * @description: 
 */
package com.sheepone.monitor.audit.autoconfigure;

import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

import com.sheepone.monitor.audit.AuditMonitorBootServer;

/**
 * @author: Miss.杨
 * @date: 2025年3月16日 15:38:51
 * @description:
 */
@AutoConfiguration
@EnableConfigurationProperties(AuditMonitorServerBootConfig.class)
public class AuditMonitorServerBootAutoConfiguration {
    @Bean
    @ConditionalOnMissingBean
    public AuditMonitorBootServer monitorServer(AuditMonitorServerBootConfig config) {
        AuditMonitorBootServer server = new AuditMonitorBootServer(config);
        server.run();
        return server;
    }
}
